home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / man.n / message.n < prev    next >
Text File  |  1995-07-21  |  11KB  |  367 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/message.n,v 1.17 93/04/01 09:52:47 ouster Exp $ SPRITE (Berkeley)
  22. '/" 
  23. .\" The definitions below are for supplemental macros used in Tcl/Tk
  24. .\" manual entries.
  25. .\"
  26. .\" .HS name section [date [version]]
  27. .\"    Replacement for .TH in other man pages.  See below for valid
  28. .\"    section names.
  29. .\"
  30. .\" .AP type name in/out [indent]
  31. .\"    Start paragraph describing an argument to a library procedure.
  32. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  33. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  34. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  35. .\"    needed;  use .AS below instead)
  36. .\"
  37. .\" .AS [type [name]]
  38. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  39. .\"    name are examples of largest possible arguments that will be passed
  40. .\"    to .AP later.  If args are omitted, default tab stops are used.
  41. .\"
  42. .\" .BS
  43. .\"    Start box enclosure.  From here until next .BE, everything will be
  44. .\"    enclosed in one large box.
  45. .\"
  46. .\" .BE
  47. .\"    End of box enclosure.
  48. .\"
  49. .\" .VS
  50. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  51. .\"    of man pages.
  52. .\"
  53. .\" .VE
  54. .\"    End of vertical sidebar.
  55. .\"
  56. .\" .DS
  57. .\"    Begin an indented unfilled display.
  58. .\"
  59. .\" .DE
  60. .\"    End of indented unfilled display.
  61. .\"
  62. '\"    # Heading for Tcl/Tk man pages
  63. .de HS
  64. .ds ^3 \\0
  65. .if !"\\$3"" .ds ^3 \\$3
  66. .if '\\$2'cmds'       .TH \\$1 1 \\*(^3 \\$4
  67. .if '\\$2'lib'        .TH \\$1 3 \\*(^3 \\$4
  68. .if '\\$2'tcl'        .TH \\$1 n \\*(^3 Tcl "Tcl Built-In Commands"
  69. .if '\\$2'tk'         .TH \\$1 n \\*(^3 Tk "Tk Commands"
  70. .if '\\$2'tclc'        .TH \\$1 3 \\*(^3 Tcl "Tcl Library Procedures"
  71. .if '\\$2'tkc'         .TH \\$1 3 \\*(^3 Tk "Tk Library Procedures"
  72. .if '\\$2'tclcmds'         .TH \\$1 1 \\*(^3 Tk "Tcl Applications"
  73. .if '\\$2'tkcmds'         .TH \\$1 1 \\*(^3 Tk "Tk Applications"
  74. .if t .wh -1.3i ^B
  75. .nr ^l \\n(.l
  76. .ad b
  77. ..
  78. '\"    # Start an argument description
  79. .de AP
  80. .ie !"\\$4"" .TP \\$4
  81. .el \{\
  82. .   ie !"\\$2"" .TP \\n()Cu
  83. .   el          .TP 15
  84. .\}
  85. .ie !"\\$3"" \{\
  86. .ta \\n()Au \\n()Bu
  87. \&\\$1    \\fI\\$2\\fP    (\\$3)
  88. .\".b
  89. .\}
  90. .el \{\
  91. .br
  92. .ie !"\\$2"" \{\
  93. \&\\$1    \\fI\\$2\\fP
  94. .\}
  95. .el \{\
  96. \&\\fI\\$1\\fP
  97. .\}
  98. .\}
  99. ..
  100. '\"    # define tabbing values for .AP
  101. .de AS
  102. .nr )A 10n
  103. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  104. .nr )B \\n()Au+15n
  105. .\"
  106. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  107. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  108. ..
  109. '\"    # BS - start boxed text
  110. '\"    # ^y = starting y location
  111. '\"    # ^b = 1
  112. .de BS
  113. .br
  114. .mk ^y
  115. .nr ^b 1u
  116. .if n .nf
  117. .if n .ti 0
  118. .if n \l'\\n(.lu\(ul'
  119. .if n .fi
  120. ..
  121. '\"    # BE - end boxed text (draw box now)
  122. .de BE
  123. .nf
  124. .ti 0
  125. .mk ^t
  126. .ie n \l'\\n(^lu\(ul'
  127. .el \{\
  128. .\"    Draw four-sided box normally, but don't draw top of
  129. .\"    box if the box started on an earlier page.
  130. .ie !\\n(^b-1 \{\
  131. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  132. .\}
  133. .el \}\
  134. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  135. .\}
  136. .\}
  137. .fi
  138. .br
  139. .nr ^b 0
  140. ..
  141. '\"    # VS - start vertical sidebar
  142. '\"    # ^Y = starting y location
  143. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  144. .de VS
  145. .mk ^Y
  146. .ie n 'mc \s12\(br\s0
  147. .el .nr ^v 1u
  148. ..
  149. '\"    # VE - end of vertical sidebar
  150. .de VE
  151. .ie n 'mc
  152. .el \{\
  153. .ev 2
  154. .nf
  155. .ti 0
  156. .mk ^t
  157. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  158. .sp -1
  159. .fi
  160. .ev
  161. .\}
  162. .nr ^v 0
  163. ..
  164. '\"    # Special macro to handle page bottom:  finish off current
  165. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  166. '\"    # page bottom macro.
  167. .de ^B
  168. .ev 2
  169. 'ti 0
  170. 'nf
  171. .mk ^t
  172. .if \\n(^b \{\
  173. .\"    Draw three-sided box if this is the box's first page,
  174. .\"    draw two sides but no top otherwise.
  175. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  176. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  177. .\}
  178. .if \\n(^v \{\
  179. .nr ^x \\n(^tu+1v-\\n(^Yu
  180. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  181. .\}
  182. .bp
  183. 'fi
  184. .ev
  185. .if \\n(^b \{\
  186. .mk ^y
  187. .nr ^b 2
  188. .\}
  189. .if \\n(^v \{\
  190. .mk ^Y
  191. .\}
  192. ..
  193. '\"    # DS - begin display
  194. .de DS
  195. .RS
  196. .nf
  197. .sp
  198. ..
  199. '\"    # DE - end display
  200. .de DE
  201. .fi
  202. .RE
  203. .sp .5
  204. ..
  205. .HS message tk
  206. .BS
  207. '\" Note:  do not modify the .SH NAME line immediately below!
  208. .SH NAME
  209. message \- Create and manipulate message widgets
  210. .SH SYNOPSIS
  211. \fBmessage\fI \fIpathName \fR?\fIoptions\fR?
  212. .SH "STANDARD OPTIONS"
  213. .LP
  214. .nf
  215. .ta 4c 8c 12c
  216. .VS
  217. \fBanchor\fR    \fBcursor\fR    \fBpadX\fR    \fBtext\fR
  218. \fBbackground\fR    \fBfont\fR    \fBpadY\fR    \fBtextVariable\fR
  219. \fBborderWidth\fR    \fBforeground\fR    \fBrelief\fR    \fBwidth\fR
  220. .VE
  221. .fi
  222. .LP
  223. See the ``options'' manual entry for details on the standard options.
  224. .SH "WIDGET-SPECIFIC OPTIONS"
  225. .ta 4c
  226. .LP
  227. .nf
  228. Name:    \fBaspect\fR
  229. Class:    \fBAspect\fR
  230. Command-Line Switch:    \fB\-aspect\fR
  231. .fi
  232. .IP
  233. Specifies a non-negative integer value indicating desired
  234. aspect ratio for the text.  The aspect ratio is specified as
  235. 100*width/height.  100 means the text should
  236. be as wide as it is tall, 200 means the text should
  237. be twice as wide as it is tall, 50 means the text should
  238. be twice as tall as it is wide, and so on.
  239. .VS
  240. Used to choose line length for text if \fBwidth\fR option
  241. isn't specified.
  242. .VE
  243. Defaults to 150.
  244. .LP
  245. .nf
  246. Name:    \fBjustify\fR
  247. Class:    \fBJustify\fR
  248. Command-Line Switch:    \fB\-justify\fR
  249. .fi
  250. .IP
  251. Specifies how to justify lines of text.
  252. Must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR.  Defaults
  253. to \fBleft\fR.
  254. .VS
  255. This option works together with the \fBanchor\fR, \fBaspect\fR,
  256. \fBpadX\fR, \fBpadY\fR, and \fBwidth\fR options to provide a variety
  257. of arrangements of the text within the window.
  258. The \fBaspect\fR and \fBwidth\fR options determine the amount of
  259. screen space needed to display the text.
  260. The \fBanchor\fR, \fBpadX\fR, and \fBpadY\fR options determine where this
  261. rectangular area is displayed within the widget's window, and the
  262. \fBjustify\fR option determines how each line is displayed within that
  263. rectangular region.
  264. For example, suppose \fBanchor\fR is \fBe\fR and \fBjustify\fR is
  265. \fBleft\fR, and that the message window is much larger than needed
  266. for the text.
  267. The the text will displayed so that the left edges of all the lines
  268. line up and the right edge of the longest line is \fBpadX\fR from
  269. the right side of the window;  the entire text block will be centered
  270. in the vertical span of the window.
  271. .VE
  272. .LP
  273. .nf
  274. .VS
  275. Name:    \fBwidth\fR
  276. Class:    \fBWidth\fR
  277. Command-Line Switch:    \fB\-width\fR
  278. .fi
  279. .IP
  280. Specifies the length of lines in the window.
  281. The value may have any of the forms acceptable to \fBTk_GetPixels\fR.
  282. If this option has a value greater than zero then the \fBaspect\fR
  283. option is ignored and the \fBwidth\fR option determines the line
  284. length.
  285. If this option has a value less than or equal to zero, then
  286. the \fBaspect\fR option determines the line length.
  287. .VE
  288. .BE
  289.  
  290. .SH DESCRIPTION
  291. .PP
  292. The \fBmessage\fR command creates a new window (given by the
  293. \fIpathName\fR argument) and makes it into a message widget.
  294. Additional
  295. options, described above, may be specified on the command line
  296. or in the option database
  297. to configure aspects of the message such as its colors, font,
  298. text, and initial relief.  The \fBmessage\fR command returns its
  299. \fIpathName\fR argument.  At the time this command is invoked,
  300. there must not exist a window named \fIpathName\fR, but
  301. \fIpathName\fR's parent must exist.
  302. .PP
  303. A message is a widget that displays a textual string.  A message
  304. widget has three special features.  First, it breaks up
  305. its string into lines in order to produce a given aspect ratio
  306. for the window.  The line breaks are chosen at word boundaries
  307. wherever possible (if not even a single word would fit on a
  308. line, then the word will be split across lines).  Newline characters
  309. in the string will force line breaks;  they can be used, for example,
  310. to leave blank lines in the display.
  311. .PP
  312. The second feature of a message widget is justification.  The text
  313. may be displayed left-justified (each line starts at the left side of
  314. the window), centered on a line-by-line basis, or right-justified
  315. (each line ends at the right side of the window).
  316. .PP
  317. The third feature of a message widget is that it handles control
  318. characters and non-printing characters specially.  Tab characters
  319. are replaced with enough blank space to line up on the next
  320. 8-character boundary.  Newlines cause line breaks.  Other control
  321. characters (ASCII code less than 0x20) and characters not defined
  322. in the font are displayed as a four-character sequence \fB\ex\fIhh\fR where
  323. \fIhh\fR is the two-digit hexadecimal number corresponding to
  324. the character.  In the unusual case where the font doesn't contain
  325. all of the characters in ``0123456789abcdef\ex'' then control
  326. characters and undefined characters are not displayed at all.
  327.  
  328. .SH "WIDGET COMMAND"
  329. .PP
  330. The \fBmessage\fR command creates a new Tcl command whose
  331. name is \fIpathName\fR.  This
  332. command may be used to invoke various
  333. operations on the widget.  It has the following general form:
  334. .DS C
  335. \fIpathName option \fR?\fIarg arg ...\fR?
  336. .DE
  337. \fIOption\fR and the \fIarg\fRs
  338. determine the exact behavior of the command.  The following
  339. commands are possible for message widgets:
  340. .TP
  341. \fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
  342. Query or modify the configuration options of the widget.
  343. If no \fIoption\fR is specified, returns a list describing all of
  344. the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
  345. information on the format of this list).  If \fIoption\fR is specified
  346. with no \fIvalue\fR, then the command returns a list describing the
  347. one named option (this list will be identical to the corresponding
  348. sublist of the value returned if no \fIoption\fR is specified).  If
  349. one or more \fIoption\-value\fR pairs are specified, then the command
  350. modifies the given widget option(s) to have the given value(s);  in
  351. this case the command returns an empty string.
  352. \fIOption\fR may have any of the values accepted by the \fBmessage\fR
  353. command.
  354.  
  355. .SH "DEFAULT BINDINGS"
  356. .PP
  357. When a new message is created, it has no default event bindings:
  358. messages are intended for output purposes only.
  359.  
  360. .SH BUGS
  361. .PP
  362. Tabs don't work very well with text that is centered or right-justified.
  363. The most common result is that the line is justified wrong.
  364.  
  365. .SH KEYWORDS
  366. message, widget
  367.